﻿using NetCore.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace NetCore.Entities.LocationAreas
{
    /// <summary>
    /// 位置区域（全国省市区城乡等区域代码位置信息.提供给Address值的每一项）
    /// </summary>
    [Description("全国省市区城乡等区域代码位置信息")]
    public class LocationArea : BaseEntity
    {
        #region 父级
        
        /// <summary>
        /// 父级区域Id
        /// </summary>
        [Description("父级区域Id")]
        public int? ParentId { get; set; }
        /// <summary>
        /// 父级区域
        /// </summary>
        [Description("父级区域")]
        public virtual LocationArea Parent { get; set; }
        
        #endregion

        #region 子级

        public LocationArea()
        {
            Children = new HashSet<LocationArea>();
        }
        /// <summary>
        /// 子级区域
        /// </summary>
        [Description("子级区域")]
        public virtual HashSet<LocationArea> Children { get; set; }

        #endregion
        
        /// <summary>
        /// 区域类型 区域深度
        /// </summary>
        [Description("区域深度")]
        public DeepLevelType Level { get; set; }
        /// <summary>
        /// 区域代码
        /// </summary>
        [Description("区域代码")]
        public string Code { get; set; }
        /// <summary>
        /// 父级区域代码
        /// </summary>
        [Description("父级区域代码")]
        public string ParentCode { get; set; }
        /// <summary>
        /// 邮编
        /// </summary>
        [Description("邮编")]
        public string ZipCode { get; set; }
        /// <summary>
        /// 区域名称
        /// </summary>
        [Description("区域名称")]
        public string Name { get; set; }
        /// <summary>
        /// 区域全名
        /// </summary>
        [Description("区域全名")]
        public string FuallName { get; set; }
        /// <summary>
        /// 英文全名
        /// </summary>
        [Description("英文全名")]
        public string InternationalName { get; set; }
        /// <summary>
        /// 英文缩写
        /// </summary>
        [Description("英文缩写")]
        public string ShortName { get; set; }
        /// <summary>
        /// 拼音
        /// </summary>
        [Description("拼音")]
        public string Pinyin { get; set; }
        /// <summary>
        /// 拼音首字母
        /// </summary>
        [Description("拼音首字母")]
        public string Prefix { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        [Description("经度")]
        public decimal? Longitude { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        [Description("纬度")]
        public decimal? Latitude { get; set; }

    }
}
